Repository navigation
fix(client): read the Inbox workflow pack through the plugin endpoint (#2656) - #2657
Merged
Merged
Conversation
The shell's Inbox wiring passed the bare `call` into readWorkflows, so the host answered `bot/not-found`, the read settled as "The Workflow plugin is not installed…", and a failed workflow run never reached the Needs list or its badge. It now uses the same `flybot/`-prefixed call the Workflows page does (#2656). Fixes #2656 Docs-not-needed: one-line endpoint-prefix fix; docs/subsystems/core-client.md already describes the Inbox read and its non-ready behavior (#2656)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written-by: Triage
Fixes #2656
Owner: Triage
Reviewer: Reviewer
What changed
core/src/client/index.jspassed the barecallintoreadWorkflows, so every Inbox poll postedworkflow/statewithout theflybot/prefix.core/src/host/channel.jsroutes onlyflybot/endpoints to a plugin and answersbot/not-foundotherwise;readWorkflowsreads that refusal as "The Workflow plugin is not installed…", so the read settledphase: 'error',workflowsOfreturned[], and a failed workflow run never appeared in the Inbox or its badge. The action now usesflybotCall(theflybot/-prefixed call fromflybot-slots.js) — the same call the Workflows page already receives fromsettings.js.actions.workflowsandactions.workflowSavestill go through the barecall; a search ofcore/src/clientfinds no client call site for either, so they are left unchanged.Tests
core/test/inbox-workflow-prefix.test.jsreads the wiring expressionindex.jsactually ships, drives it against a fetch that implementschannel.js's two branches, and asserts the host saw onlyflybot/workflow/state, that the read settlesready, and thatpack.workflowsis non-empty. On pristineb4de72ca9fit fails with:It does not stub
workflowState(unlikeinbox-workflow-failure.test.js:321), so the assembly is what is measured.Verification at the tip
Tip SHA: f840979
Ran:
cd core && TZ=UTC DSH_HARNESS=/data/dsh/bot/workspace/d2607/repo/core/dev/harness node --import ./test/harness-resolve.mjs --test test/inbox-workflow-prefix.test.js test/inbox-workflow-failure.test.js— 11/11 passb4de72ca9f— 1 failing (the assertion quoted above)cd core && npm run build—core/client.jsregenerated (readWorkflows(call2), wherecall2is theflybot/call)node scripts/ds-bot-patches.mjs generate—checkandcanonicalgreen (patches 0003/0008 updated, the new test stored whole underfiles/test/)node scripts/build-client.mjs --check— exit 0node .github/scripts/check-mojibake.mjs --check— 0 occurrences of U+FFFD in 1556 text filesnode .github/scripts/changelog.mjs check— 15 fragments well formedsrc,test) — 0 errorsNot run: full
npm run verify(one suite at a time on this box, per the task),npm run lint'sarch-docshalf (it needs the branch base as a git checkout); theDocs-not-needed:trailer is in both this body and the branch commit.Checkpoint
{ "pr": 2657, "claim": "Triage", "issue": 2656, "summary": "The Inbox workflow read used the bare call, so the host refused workflow/state with bot/not-found and readWorkflows settled every poll as \"plugin not installed\": a failed run never reached the Needs list or its badge. index.js now passes the flybot/-prefixed call into readWorkflows, the same call the Workflows page uses. The new test drives the wiring index.js ships against a fetch that implements channel.js two branches, so it fails on the old wiring. actions.workflows and actions.workflowSave still use the bare call with no client call site, so they are untouched.", "files": ["core/src/client/index.js", "core/client.js", "core/test/inbox-workflow-prefix.test.js", "patches/ds-bot/0003-flybot-api-client.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/test/inbox-workflow-prefix.test.js", "changelog.d/2656.fixed.md"], "checks": { "ran": "TZ=UTC DSH_HARNESS=… node --import ./test/harness-resolve.mjs --test test/inbox-workflow-prefix.test.js test/inbox-workflow-failure.test.js; node scripts/ds-bot-patches.mjs check; node scripts/ds-bot-patches.mjs canonical; node scripts/build-client.mjs --check; node .github/scripts/check-mojibake.mjs --check", "result": "green", "at": "f84097914334ccac78bd20c75b1ea34816361dce" }, "next": "none — ready for review" }Docs-not-needed: one-line endpoint-prefix fix;
docs/subsystems/core-client.mdalready describes the Inbox read and its non-ready behavior (#2656).